import request from './requser.js'

// 测试接口
export  const testHtml = params => request({ url: '/test.html', method: 'get', params })

// 轮播图  /banner   
export  const apiBanner = params => request({ url: '/banner', method: 'get', params })
// 手机登录 /login/cellphone    phone: 手机号码 password: 密码
export  const loginCellphone = params => request({ url: '/login/cellphone', method: 'get', params })
// 邮箱登录 /login    email: 163 网易邮箱 password: 密码 
export  const loginEmail = params => request({ url: '/login', method: 'get', params }) 
// 注册(修改密码)  /register/cellphone    captcha: 验证码  phone : 手机号码  password: 密码  nickname: 昵称
export  const registerCellphone = params => request({ url: '/register/cellphone', method: 'get', params }) 
// 检测手机号码是否已注册  /cellphone/existence/check   phone : 手机号码
export  const cellphoneExistenceCheck = params => request({ url: '/cellphone/existence/check', method: 'get', params }) 
// 发送验证码  /captcha/sent    phone: 手机号码
export  const captchaSent = params => request({ url: '/captcha/sent', method: 'get', params }) 
// 退出登录  /logout
export  const apiLogout = params => request({ url: '/logout', method: 'get', params }) 
// 获取用户详情  /user/detail    uid : 用户 id
export  const userDetail = params => request({ url: '/user/detail', method: 'get', params }) 
// 获取用户等级  /user/level
export  const userLevel = params => request({ url: '/user/level', method: 'get', params }) 
// 更新用户信息  /user/update    gender: 性别 0:保密 1:男性 2:女性  birthday: 出生日期,时间戳 unix timestamp  nickname: 用户昵称  province: 省份id  city: 城市id  signature：用户签名
export  const userUpdate = params => request({ url: '/user/update', method: 'get', params }) 
// 更新头像  /avatar/upload    'Content-Type': 'multipart/form-data'
export  const avatarUpload = data => request({ url: '/avatar/upload', method: 'post', data,headers:{ 'Content-Type': 'multipart/form-data' } }) 
// 国家编码列表  /countries/code/list
export  const countriesCodeList = params => request({ url: '/countries/code/list', method: 'get', params }) 
// 获取用户歌单 /user/playlist  uid
export  const userPlaylist = params => request({ url: '/user/playlist', method: 'get', params }) 
// 获取用户关注列表  /user/follows  uid
export  const userFollows = params => request({ url: '/user/follows', method: 'get', params }) 
// 获取用户粉丝列表  /user/followeds    uid:用户id   limit返回数量,默认为 30
export  const userFolloweds = params => request({ url: '/user/followeds', method: 'get', params }) 
// 获取用户动态  /user/event    uid : 用户 id  limit : 返回数量 , 默认为 30
export  const userEvent = params => request({ url: '/user/event', method: 'get', params }) 
// 转发用户动态  /event/forward  uid : 用户 id  evId : 动态 id  forwards : 转发的评论
export  const eventForward = params => request({ url: '/event/forward', method: 'get', params }) 
// 删除用户动态  /event/del    evId : 动态 id
export  const eventDel = params => request({ url: '/event/del', method: 'get', params }) 
// 获取动态评论  /comment/event    threadId : 动态 id
export  const commentEvent = params => request({ url: '/comment/event', method: 'get', params }) 
// 关注/取消关注用户  /follow    id : 用户 id  t : 1为关注,其他为取消关注
export  const apiFollow = params => request({ url: '/follow', method: 'get', params }) 
// 获取用户播放记录  /user/record    uid : 用户 id  type : type=1 时只返回 weekData, type=0 时返回 allData
export  const userRecord = params => request({ url: '/user/record', method: 'get', params }) 
// 获取动态消息  /event    pagesize : 每页数据,默认20  lasttime : 返回数据的 lasttime ,默认-1,传入上一次返回结果的 lasttime,将会返回下一页的数据
export  const apiEvent = params => request({ url: '/event', method: 'get', params }) 
// 歌手分类列表  /artist/list    limit : 返回数量 , 默认为 30  offset : 偏移数量
//   type -1:全部 1:男歌手 2:女歌手 3:乐队    area -1:全部 7华语 96欧美 8:日本 16韩国 0:其他
export  const artistList = params => request({ url: '/artist/list', method: 'get', params }) 
// 歌单 ( 网友精选碟 )  /top/playlist    order: new最新 hot最热  cat 分类接口获取 默认 全部  limit 数量  offset 偏移
export  const topPlaylist = params => request({ url: '/top/playlist', method: 'get', params }) 
// 歌单分类  /playlist/catlist   
export  const playlistCatlist = params => request({ url: '/playlist/catlist', method: 'get', params }) 
// 热门歌单分类  /playlist/hot
export  const playlistHot = params => request({ url: '/playlist/hot', method: 'get', params }) 
// 获取歌单详情  /playlist/detail    id : 歌单 id  s : 歌单最近的 s 个收藏者,默认为8
export  const playlistDetail = params => request({ url: '/playlist/detail', method: 'get', params }) 
// 获取音乐 url  /song/url    id : 音乐 id
export  const songUrl = params => request({ url: '/song/url', method: 'get', params }) 
// 音乐是否可用  /check/music  id : 歌曲 id
export  const checkMusic = params => request({ url: '/check/music', method: 'get', params }) 
// 搜索 /search  keywords关键字  limit 返回数量
export  const apiSearch = params => request({ url: '/search', method: 'get', params }) 
// 收藏/取消收藏歌单  /playlist/subscribe    t : 类型,1:收藏,2:取消收藏 id : 歌单 id
export  const playlistSubscribe = params => request({ url: '/playlist/subscribe', method: 'get', params }) 
// 歌单收藏者  /playlist/subscribers    id : 歌单 id  limit: 取出评论数量 , 默认为 20  offset: 偏移数量
export  const playlistSubscribers = params => request({ url: '/playlist/subscribers', method: 'get', params }) 
// 获取歌词  /lyric    id: 音乐 id
export  const apiLyric = params => request({ url: '/lyric', method: 'get', params }) 
// 所有榜单  /toplist
export  const apiToplist = params => request({ url: '/toplist', method: 'get', params }) 
// 所有榜单内容摘要  /toplist/detail
export  const toplistDetail = params => request({ url: '/toplist/detail', method: 'get', params }) 
// 通知 - 私信  /msg/private    limit : 返回数量 , 默认为 30  offset : 偏移数量
export  const msgPrivate = params => request({ url: '/msg/private', method: 'get', params }) 
// 通知 - 评论  /msg/comments  limit : 返回数量 , 默认为 30  before : 分页参数,取上一页最后一个歌单的 updateTime 获取下一页数据
export  const msgComments = params => request({ url: '/msg/comments', method: 'get', params }) 
// 通知 - @我  /msg/forwards  limit : 返回数量 , 默认为 30  offset : 偏移数量
export  const msgForwards = params => request({ url: '/msg/forwards', method: 'get', params }) 
// 通知 - 通知  /msg/notices  limit : 返回数量 , 默认为 30  lasttime : 返回数据的 time ,默认-1,传入上一次返回结果的 time,将会返回下一页的数据
export  const msgNotices = params => request({ url: '/msg/notices', method: 'get', params }) 
// 推荐电台  /personalized/djprogram
export  const personalizedDjprogram = () => request({ url: '/personalized/djprogram', method: 'get' }) 
// 推荐节目  /program/recommend
export  const programRecommend = () => request({ url: '/program/recommend', method: 'get' }) 
// 独家放送(入口列表) /personalized/privatecontent
export  const personalizedPrivatecontent = () => request({ url: '/personalized/privatecontent', method: 'get' }) 
